﻿
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>小荷</title>
    <meta name="description" content="网站简介" />
    <meta name="keywords" content="网站关键词" />

    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta content="telephone=no" name="format-detection" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <!--框架样式表-->
    <link href="/Content/css/amazeui.min.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="/Content/css/frozen.css">
    <!--公共样式表-->
    <link href="/Content/css/common.css" rel="stylesheet" type="text/css">
    <!--基础样式表-->
    <link href="/Content/css/style.css" rel="stylesheet" type="text/css">

    <!--JQ类库-->
    <script src="/Content/js/jquery.min.js"></script>
    <script src="/Content/js/amazeui.min.js"></script>
    <script src="/Content/js/zepto.min.js"></script>
    <script src="/Content/js/frozen.js"></script>
    <!--弹窗框架类库-->
    <script src="/Content/layer/layer.js"></script>


</head>

<body>

    <img src="/Content/img/login_bg.jpg" class="xh-bg"><!--登录背景-->
    <div style="position:fixed; width:100%; height:100%;">
        <div class="xh-main">
            <div class="xh-logo" style="font-size:24px;color:yellow;font-weight:bold;">@*<img src="/Content/img/logo.png">*@我们的派生3</div>
            <div class="lo-main">
                <form>
                    <div class="fo-main">
                        <div class="fo-li"><input type="text" id="uname" class="lo-put" placeholder="请输入登录账号"></div>
                        <div class="fo-li" style="border:none;"><input type="password" id="pwd" class="lo-put" placeholder="请输入密码"></div>
                    </div>
                    <div class="fo-btn"><input type="button" class="lo-btn" value="登录" /></div>
                </form>
            </div>
            <div class="xh-wj" style="width:150px;"><a href="#">忘记密码？</a>&nbsp;&nbsp;<a href="/home/register">注册</a></div>
        </div>
    </div>


    <script>
        $('.lo-btn').click(function () {
            var username = $("#uname").val();
            var pwd = $("#pwd").val();
            if (username == "" || username == '') {
                layer.msg('请输入用户名！');                return false;
            }
            if (pwd == "" || pwd == '') {
                layer.msg('请输入密码！');                return false;
            }
            $.ajax({
                data: { 'username': username,'pwd':pwd },
                type: "POST",
                url: "/Home/CheckLogin",
                dataType: 'json',
                success: function (data) {
                    if (data.state == "success") {
                        window.setTimeout(function () {
                            window.location.href = "/Home/UserInfo"
                            //window.location.href = "/Home/Index";
                        }, 500);
                    } else {
                        layer.msg('系统异常！');
                    }
                },
                error: function (xhr, textStatus, errorThrown) {
                    layer.msg('系统异常！');
                }
            });
   
        });
    </script>




</body>
</html>
